/*
 * VehiclePath.h
 *
 *  Created on: Mar 23, 2013
 *      Author: ohnozzy
 */

#ifndef VEHICLEPATH_H_
#define VEHICLEPATH_H_
namespace flyingcamera
{
    namespace base
    {
    class VehiclePath
           {
               protected:
    	       double delta_t;
        	   public:
    	       VehiclePath(): delta_t(0.001){}
        	   virtual ~VehiclePath(){};
        	   void setDelta_t(double t){delta_t=t;}
        	   virtual void getLocation(double t, double& x, double& y, double& Yaw) const =0;
        	   virtual void getState(double t, double& x, double& y,  double& vx, double& vy) const;
           };
           class StraightLine: public VehiclePath
           {
        	   protected:
        	   double sx, sy, gx, gy;
               public:
        	    StraightLine(double x0, double y0, double x1, double y1): sx(x0), sy(y0), gx(x1), gy(y1)
               {

               }
               	virtual void getLocation(double t, double& x, double& y, double& Yaw) const{
               		x=(1-t)*sx+t*gx;
               		y=(1-t)*sy+t*gy;
               	}
           };
    }
}



#endif /* VEHICLEPATH_H_ */
